package com.school.appleforgetbackend.controller;

import com.school.appleforgetbackend.BO.request.SwxxRequest;
import com.school.appleforgetbackend.BO.response.ExperimentResponse;
import com.school.appleforgetbackend.BO.response.JcResponse;
import com.school.appleforgetbackend.BO.response.ReWellingResponse;
import com.school.appleforgetbackend.service.UnderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 回补井群、监测井群 json
 * **/
@Controller
@RequestMapping("/json")
public class ReWellController {
    @Autowired
    private UnderService underService;

    /**
     * 回补井
     **/
    @RequestMapping(value = "/huibu.json")
    @ResponseBody
    public ReWellingResponse gethuibu(@RequestBody SwxxRequest swxxRequest) {
        ReWellingResponse reWellingResponse = underService.gethuibu(swxxRequest);
        System.out.println(reWellingResponse);
        return reWellingResponse;
    }

    /**
     * 监测井
     **/
    @RequestMapping(value = "/jiance.json")
    @ResponseBody
    public JcResponse getjiance(@RequestBody SwxxRequest swxxRequest) {
        JcResponse jcResponse = underService.getjiance(swxxRequest);
        System.out.println(jcResponse);
        return jcResponse;
    }
}
